/**
 * 
 */
package com.java.test.platmanage.dto;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.time.LocalDateTime;
import java.time.ZoneOffset;

import org.springframework.jdbc.core.RowMapper;

/**
 * 平台参数设置
 *
 */
public class PlatParamInfo implements RowMapper<PlatParamInfo> {

	// 主键id
	private int id;

	// 平台名称
	private String platName;

	// 平台域名
	private String realmName;

	// 备注
	private String content;

	// 更新时间
	private LocalDateTime updateTime;

	// 状态（0：禁用，1：启用）
	private int status;

	
	private String paramList;
	
	
	
	
	
	
	
	public String getParamList() {
		return paramList;
	}

	public void setParamList(String paramList) {
		this.paramList = paramList;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getPlatName() {
		return platName;
	}

	public void setPlatName(String platName) {
		this.platName = platName;
	}

	public String getRealmName() {
		return realmName;
	}

	public void setRealmName(String realmName) {
		this.realmName = realmName;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public LocalDateTime getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(LocalDateTime updateTime) {
		this.updateTime = updateTime;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	@Override
	public PlatParamInfo mapRow(ResultSet rs, int rowNum) throws SQLException {
		PlatParamInfo info = new PlatParamInfo();

		info.setId(rs.getInt("id"));
		info.setContent(rs.getString("content"));
		info.setPlatName(rs.getString("plat_name"));
		info.setRealmName(rs.getString("realm_name"));
		info.setStatus(rs.getInt("status"));
		info.setUpdateTime(rs.getTimestamp("update_time") == null ? null
				: rs.getTimestamp("update_time").toInstant().atZone(ZoneOffset.ofHours(8)).toLocalDateTime());
		
		info.setParamList(rs.getString("param_list"));
		
		
		return info;
	}

}
